package com.example.weather.model;


import com.google.gson.annotations.SerializedName;

import java.util.List;

public class PlaceResponse {

    private String status;
    private List<Place> places;

    public String getStatus() {
        return status;
    }

    public List<Place> getPlaces() {
        return places;
    }

    public static class Place {

        private String name;
        private Location location;

        @SerializedName("formatted_address")
        private String address;

        @Override
        public String toString() {
            return "Place{" +
                    "name='" + name + '\'' +
                    ", location=" + location +
                    ", address='" + address + '\'' +
                    '}';
        }

        public String getName() {
            return name;
        }

        public Location getLocation() {
            return location;
        }

        public String getAddress() {
            return address;
        }
    }

    public static class Location {

        private String lng, lat;

        public String getLng() {
            return lng;
        }

        public String getLat() {
            return lat;
        }

        @Override
        public String toString() {
            return "Location{" +
                    "lng='" + lng + '\'' +
                    ", lat='" + lat + '\'' +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "PlaceResponse{" +
                "status='" + status + '\'' +
                ", places=" + places +
                '}';
    }
}